UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uTk1AnTAbnNsAgHkPUrRmPMD6UdslMhEMh4gxfgvn9E='
WHERE
key_id = '62354ad999bcee5deb3825d29bd3ec9e05c48c56597c7eac87d900ae340e8bc5'
AND (
token = 'uTk1AnTAbnNsAgHkPUrRmPMD6UdslMhEMh4gxfgvn9E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)