ticket based locking