UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MDCxP9h/9CfTTSeQ5VrIVNa3tKrK27DCcKMuv/Da4W0='
WHERE
key_id = '63a00fde541059269fe1ed233ccfeb3b5264fcdf844727908d1e5a31a66c6202'
AND (
token = 'MDCxP9h/9CfTTSeQ5VrIVNa3tKrK27DCcKMuv/Da4W0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)