I always buy used and have never bought an extended warranty. I tend to check the vehicles maintinence history with the dealership to make sure the oil was changed at proper intervals and if there were any other repairs done under warranty. If you can, get a copy of the Lemonaid Guide to see what reliability issues the vehicle you are looking at possibly has.
http://www.lemonaidcars.com/
Those above 2 things will give you an indication if an extended warranty is worth buying.