UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'S4/e9gpwGJgNhpKvEoDrsQOnTAcplpsYPQDeR1A3yoM='
WHERE
key_id = '8bad39c144cf1f8f9798c11fd7743657e4549a6aadd6f7d7c13db50b498ba614'
AND (
token = 'S4/e9gpwGJgNhpKvEoDrsQOnTAcplpsYPQDeR1A3yoM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)