The d40 is a little old but, 80 bucks is a good deal. Where are you located? generally speaking there are Facebook groups in your state/county/city and photog equipment (especially lower end amateur cameras) can be grabbed really cheap.
For $200 you really do need to go used if you want a dslr. IF you can get together another 200 your options open up a bit more.
The d40 was replaced by the d3000, and I shot a d3300 as my first camera (pretty similar) and as a professional photographer it was unusable as I was shooting for print (print being high DPI magazine/billboard stuff). HOWEVER, if this is just to snag high res photos of your beautiful new comer then you are fine with the d40. Ask your buddy to dial it in for you and be sure you take some test shots in a similar environment before hand. Also, MAKE sure you shoot at the lowest ISO possible and always shoot in RAW with a lower end camera. Imo, the jpegs are just too grainy.
Dude the d40 is a very capable rig if you set it up right, for $80 bones. Get it, enjoy your new baby!