@Steven K. That does sound high. I'm assuming the 40k is soup to nuts, dig out, new slab, framing, finishes, etc., and the extra bath? If it's 40k to just lower the slab, that's ridiculous and I'd find someone new. Do you have a GC, and if so, why is he not handling the basement? If you're doing a full reno, the basement dig should've been a line item, and then you should be getting economy of scale with framing, drywall, mechanicals, etc. So for me, my GC did the 350-400sqft basement dig and new slab for 6k, but he added to the pricing for all the other line items because he now had another 350-400sqft to finish just like the rest of the house. How much extra, I don't really know because the budget isn't broken out in that level of detail. If I just take the 350-400sqft as a percentage of the house, I estimate the entire basement job is 15-18k (and there's no bathroom).
So if 40k is for everything, including that extra bath, and you have a 400sqft+ basement, that doesn't sound super crazy, especially considering you're contracting the basement completely separate from the rest of the house. But yeah, if you were saying 40k just to dig and pour a new floor, I'd definitely find someone else.