Fix calculation of "until" variable in the Lock() method

Replace "m.Expiry" to the local "expiry" variable when calculated the "until" variable in the Lock() method