UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VnD3sWdK6aiYxVFx1dg71//jkig2cAhmggJugsz2XdQ='
WHERE
key_id = '800e882eb92f18ddc5368df42883f144fabd57f0efcd5e88fa346eb8a9d8dd4a'
AND (
token = 'VnD3sWdK6aiYxVFx1dg71//jkig2cAhmggJugsz2XdQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)