UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UTV+x++mInLKAWNol5BiOnt5EmSt5tyuDjvJ/VZbVq0=' 
WHERE 
  key_id = '4cae0698d3d0c8b7d46cf82917f527d78dca6d80f78f286def508697b6e54afe' 
  AND (
    token = 'UTV+x++mInLKAWNol5BiOnt5EmSt5tyuDjvJ/VZbVq0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043