If you have done a marathon then you can do 40miles. I'm not a fan of back to back runs, I know what it is like to run on tired legs. Just stick to your training plan and you'll be fine. I wouldn't bother training up to 30miles, just run your 20mile long runs faster. Come race day just run slow and focus on finishing.
I'm a lazy runner and generally don't run much more than 30miles per week, maybe not the best advice =\ then again I have finished all the ultras I have started.