If something went wrong with the dryer, a short circuit, overload of some ilk, etc., a 40 amp breaker would allow too much current to flow before it tripped, not as much as a 50 amp, but still more than should be allowed. The breaker should be changed to a 30 amp.