UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XFHObuU8Q2xrQ3mjwLxGWT+3oGreKed8flyWV/v2R4A='
WHERE
key_id = '4480bd9e1339e987f9d6c93042665c129f6ba86c01e9440752acf27d13bbb320'
AND (
token = 'XFHObuU8Q2xrQ3mjwLxGWT+3oGreKed8flyWV/v2R4A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)