UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fHRTzhrF5/7FyyBjhHXr3fgrIoLiUR4Anbif6e3rooA='
WHERE
key_id = '95df875aa0adf6a3dcd333bd40c427f6eff7473ac34e697072010039ba926f39'
AND (
token = 'fHRTzhrF5/7FyyBjhHXr3fgrIoLiUR4Anbif6e3rooA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)