UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FL9jyamO6QkYZ/0A2S+B+bKGmXQ9PTXLnGSsEJZvEAI='
WHERE
key_id = '86f914f89cae69f3669b8d66bfc66adc822adc3ab79b78d3c411df1ad21ac2ad'
AND (
token = 'FL9jyamO6QkYZ/0A2S+B+bKGmXQ9PTXLnGSsEJZvEAI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)