The DC10-40 was designed to replace the DC10-15 mainly, and instead of using GE engines it used PW's. Nevertheless only 42 were built (20 to JL and 22 to NW).
They're called -40 because of a marketing gimmick. Originally it was going to be called -20 but NW stated that it was more advanced than the -30, so there you have the number.
In AWS there's no need for it because the -30 is so much better, but is indeed useful if you find it in the used market.