You can absolutely buy that warranty any time before your factory warranty expires, though the price increases the closer you get to expiration.
We just bought our 5 late last week and we passed on the warranty. I have a little different perspective than others, I suppose. I am able to do most mechanical work myself and because of that I consider $1200-$1400 for a warranty that does NOTHING for me for the next 3-4 years (while I'm under factory warranty) to be an extreme waste of money. At that point, since I can do most all of the wrenching myself, any repairs only 'cost' me the price of the parts. Also, barring accident, outright abuse or neglect of maintenance it's very, very unlikely that you'll have a mechanical or electronic failure after the factory warranty runs out but before 100,000 miles. Electronics typically fail almost immediately or else never, and expensive mechanical items (powertrain) aren't far off of that.
I would certainly consider an extended warranty on a used car that's out of warranty because there are so many liars/cheats/lazies out there who don't do maintenance that you never know what you're getting. On the other hand, at that point I'd be buying something that's useful immediately. In addition I'd be looking aftermarket where the warranties I've shopped for in the past are typically 1/2 or even only 1/3-1/4 the price of the dealer-sold warranty and also often from the same company.
Just my perspective here, not necessarily "the way to go."