def release(self):
        """
        Release the lock.

        :returns: Returns ``True`` if the lock was released.
        """
        unlocked = self.database.run_script(
            'lock_release',
            keys=[self.key, self.event],
            args=[self._lock_id])
        return unlocked != 0