UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+MAV/crLbEHkof0nTyuFpV1ZF4KDWM1dRcbQa0QR1HI='
WHERE
key_id = '35a4f75dfdad23a704d027247fe00ee59f5e2337b435ed7c0a013b5311ca7798'
AND (
token = '+MAV/crLbEHkof0nTyuFpV1ZF4KDWM1dRcbQa0QR1HI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)