Locks are freed by calling Unlock or by calling Lock with the LOCK_MODE.LOCK_FREE_LOCK mode. If freeing locks inside an active transaction, the locks of updated records will only be actually freed when the transaction terminates.
// free locks
ARecord.Unlock();