Cleanup locks after releasing

This adds a little more logic to the SQLDB locks, allowing them to cleanup after themselves upon releasing.
They will grab another lock before deleting to ensure that a chance is given to someone waiting for the lock to grab it. Deletion is not retried since it's assumed that the next owner of the lock will delete it later.
is this change related?

looks like it can result in returning `nil`, `nil` which seems odd