UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2J+4IZNiwEesxg80kd4dgCGIPgRcOgnQZv/AkXzV3zY=' 
WHERE 
  key_id = '33afd06687ab66f360fa1e46e782d7f52daaa8029d5effa9d1291d7a92c53224' 
  AND (
    token = '2J+4IZNiwEesxg80kd4dgCGIPgRcOgnQZv/AkXzV3zY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033