Going from 30 to 40 is a learning experience. You will figure out how your body reacts to it. Muscles might be the first thing that tell you to stop and rest (early onset of cramps).
Its how you face a challenge. Some riders take rest stops. The less stops the better. If you are good with 30 miles with zero stops (except for traffic lights), then going 40 might be ok with a stop at 20 for a few minutes. During that stop make sure you drink and take electrolytes.
Basically, you are training your body to do more endurance.