UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Io6Lou/nl/Wso78+9ce2QGZM9+uWyi02OQHzwZ7Wv0A='
WHERE
key_id = '879a9956e7703d6dcc4dc52cfa8fd0fbed9046c28823221dbe40316f60bb18e8'
AND (
token = 'Io6Lou/nl/Wso78+9ce2QGZM9+uWyi02OQHzwZ7Wv0A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)