UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dGbboJpLW8RccTMM5nPcZmIzBB1YWp9YaYKhBM6SERA='
WHERE
key_id = 'de0c0d566caa9aa8a9cdd08a59eb127b9bdc2048d5b4b7e6aa9b238125b8ec00'
AND (
token = 'dGbboJpLW8RccTMM5nPcZmIzBB1YWp9YaYKhBM6SERA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)