locking: Implement opportunistic locking in LockSet