UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2irzEtfj1yLJDzIF0t5LGfENPZCUNek6Kz8tmGaOd5A='
WHERE
key_id = '642e5beba24550010afe29bbc03b504046d0348f4f0def400f6f178ba64fc9e0'
AND (
token = '2irzEtfj1yLJDzIF0t5LGfENPZCUNek6Kz8tmGaOd5A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)