UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5YoVecxKyJ6GVVCuvzAqW8bF5jjpvt8VJQFcWtUglSc='
WHERE
key_id = '919b2676cc9eb47d6deb1fd924c654bd036aebf5b0c04438c19bc95479b35dae'
AND (
token = '5YoVecxKyJ6GVVCuvzAqW8bF5jjpvt8VJQFcWtUglSc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)