Nikon D40 is an entry-level DSLR camera while Canon Mark III is a pro-level camera. So, if you would go with Canon Mark III, it's a big upgrade. For me, I do photography as a hobby, so the Mark III is too expensive.

However, if you can afford it, go for it. It's a top-notch camera from Canon.
Before making the decision, I recommend you to visit your local camera or electronics store to try out and feel all candidates you have in mind with your own hands.