Fixed calculation of "until" variable in the Lock()

Fixed calculation of "until" variable in the Lock() method - "m.Expiry" replaced to the local variable "expiry"