UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1cr2fnG70qlaILFMPnIjYHJ3cT5/s4z/q7MGcbTlmNo='
WHERE
key_id = '766b5bcb5a48a061a27c576cf43827d2bd8d93702b408c9fb05ffe70d8c3a53b'
AND (
token = '1cr2fnG70qlaILFMPnIjYHJ3cT5/s4z/q7MGcbTlmNo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)