The 17-40 on the 5D should definitely be able to breathe "new life" into your landscape/scenic photography! If you can afford the 5D sure, go for it!
As comparing IQ between the 5DC and the 40D, well, I never had a 40D so can't say directly, although I will say that a lot of folks went to a 5D after the 40D and have expressed real happiness.
Take a look at the 5D Classic Admirers' thread, and then ask folks there for feedback about this, and be prepered
!:
https://photography-on-the.net/forum/showthread.php?t=996038
I will say, though, that I personally would not be quick to dump the 40D even if you are thrilled with the 5D. I shot with the 30D and decided to go with the 5D and, for general shooting the 5D was (and is) my body of choice.
But the 5D is not the "best for everything". For things such as bird/wildlife shooting and macros of little things a crop body does deliver "more pixels on-target", and that remained a consideration of mine. In fact, I added the 1DMk3 to my gear because I wanted both that and the high-perfomance of the 1D3, but still never gave up the 30D, in fact, I've recently used it for "bug" macros with good results and, for a time when the 5DC had to go in to fix the famous "mirror fall-off" the 30D became my walk-aroud lens!