UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uDFZoy+b/7BAgYhtbIOMxwh9C/veWXkpqdkzb/gWsWw='
WHERE
key_id = '0c9544023c59b5222f5fc839ff77a8baca4c4032213fe0d81f5e3d9ab54075cc'
AND (
token = 'uDFZoy+b/7BAgYhtbIOMxwh9C/veWXkpqdkzb/gWsWw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)