UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U/26LTzBRujNz5JlGNAUBqE5aSeZM/37sHORyoRRa8k='
WHERE
key_id = 'e980c86a0511ae2088144fe10105f8dd2f506d34a108015c2afa79ff44d0d225'
AND (
token = 'U/26LTzBRujNz5JlGNAUBqE5aSeZM/37sHORyoRRa8k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)