UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VfAETTJI7XQ9mdzqiynB5KJyU0oGz0XBKWQqZ3VT/WU='
WHERE
key_id = 'f445f96c160011b44b036e08271b753552695c7627119345afd97c860a4b743c'
AND (
token = 'VfAETTJI7XQ9mdzqiynB5KJyU0oGz0XBKWQqZ3VT/WU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)