UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BBrRGKXhYtFeok8MO7pYqbB/gdttu5Lp+JqjXqmV7GU='
WHERE
key_id = '0a02799a066687a3eb79d3464019811218c75f05af8a97cb32c17a4583067928'
AND (
token = 'BBrRGKXhYtFeok8MO7pYqbB/gdttu5Lp+JqjXqmV7GU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)