UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YyZK9NweouVCfxCKhPRPAiduKVb/oethDrbs/fy0WYE='
WHERE
key_id = '285707fd7575022e530365d2bdac2a559219ce60c773242f073ff223733a375f'
AND (
token = 'YyZK9NweouVCfxCKhPRPAiduKVb/oethDrbs/fy0WYE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)