UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '00eiURoz+SYWFLnQGDziRsYSqJL4Z4VdCxZfCpH2zJo='
WHERE
key_id = 'c8e8ccefcd5de563c1220d3201a2b3b77df3fd73ad6e463d3ecb074b2df7f729'
AND (
token = '00eiURoz+SYWFLnQGDziRsYSqJL4Z4VdCxZfCpH2zJo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)