what is your definition of reasonable price ??? a powerfull server running open source software like vyos can probably do 40Gb no issues.
If you want a router appliance from a known vendor like cisco or juniper it will cost you more but probably more reliable from long term support basis. So please describe your requirements in details and we can probably suggest some platform for you.
You need VPN or crypto of just move 40G of traffic or fill a 40G port ?
ASR1002-HX with x 2 x 40 NIM or 1 x 100 NIM maybe the go but cheap it is not.
To route 40G interface speeds you really need to go up the product stack. (L3 switch 40G is one thing but really apply router functions is much harder)
The Arista 7280R can do 40G (I think 100G) too and is "reasonable" for that speed. I've seen quotes floating around for about $20-30k. It can hold full tables as well.
Alternatively you could look at an older Juniper SRX5400, update with the latest routing engine and toss in 40G line cards. You can route 40G full duplex with ease, even VPN at those speeds. Used you're looking maybe $10k?
Unless you need to terminate VPN's or take full tables you can probably get away with an L3 switch.