UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PrXDmEHKoxhOJSnAhNlyCE2RKyU8KbyhYxIQ2IWG310='
WHERE
key_id = '43cfb6d5577406e09fdbde7fe38ceb1660dae37417484fe279c0a34f8b3ea167'
AND (
token = 'PrXDmEHKoxhOJSnAhNlyCE2RKyU8KbyhYxIQ2IWG310='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)