UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XUt/dPc6yO8CCV7m0elr3Qo7TL5d1s0AAi6eV9JaKRk='
WHERE
key_id = '7026e603ffa9269f6acaedbd2a3025c9618cbf46dd8abf6d767fc1dabf9cfd1e'
AND (
token = 'XUt/dPc6yO8CCV7m0elr3Qo7TL5d1s0AAi6eV9JaKRk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)