There are penetrating oils out there even better than WD-40. Moovit, PB Blaster, or a variety of other names. You spray those on, tap the bolt with a small mallet so it makes a nice ringing noise (the vibrations help the oil penetrate). Then you leave it a couple of hours, and repeat. After a few days of oil-ring-soak cycles, get a solid handle for your sockets (i.e. one that doesn't ratchet), and get a four-foot steel pipe that slips over the handle.
Another option is to get a propane torch. Heating and cooling cycles will both help the penetrating oil penetrate, and if you heat the nut part more so that it expands a tiny bit more than the bolt part, that can help loosen it.
If you can get at the bolt, and it's big enough that it's not rounding off in your socket, and it's not covered in oil and other things that might burn, those should deal with run of the mill rusted togetherness.
If it's covered in engine oil and rounded off and in tight spots you can't get to, then you have problems

The advice I've been receiving on some bolts that are all of the above, is to buy a new car...