Lock a reference
Lock the specified reference. This is the first step to updating a reference.
the transaction
the reference to lock
0 or an error message