-Make sure you use a 6-point socket, or a special O2 sensor socket, not a 12-point socket, to avoid rounding off.
- Plenty of penetrating oil and patience. Give it time to soak in. I've occasions where I've had to leave a stuck fastener soaking for a week. If possible, park the car for a few days (exhaust heat will cook off the penetrating oil). Re-apply every few hours and tap the area around the threads with a screwdriver handle, or something to help loosen up the crud. This takes a lot of persistence but often pays off in the end.
- Heat. First try going at the O2 sensor immediately after a drive, when the exhaust system is hot. This may expand the opening just enough to loosen it. If that doesn't work, try using a heat gun. Be careful not to heat up the underside of the floor and possibly melt your carpet or something inside the truck. A propane torch will work, too. Naturally, you'll probably cook the O2 sensor guts, so you'll be replacing it.
- Don't be too proud to take it to a professional mechanic, and have him pull it off. A few bucks spent having a pro do it could save you a lot of headaches and more money than if you damage the threads.
Good luck.