we need to make sure not to expire the lock of another process in an atomic way