Attempt locking in a transaction