A race car driver under the caution flag at 10 feet per second begins to accelerate at a constant rate after the warning flag. The distance traveled since the warning flag in feet is characterized by 30t^2+10t, where t is the time in seconds after the car starts accelerating again. How long does it take the car to travel 40 feet after it begins accelerating?