Because you’re looking at a car built before January 1 2019, the vehicle won’t carry Toyota’s current, upgraded five-year factory warranty. Instead, you’ll get what’s left of the three-year/100,000km factory warranty. In the case of a hybrid Toyota, that also includes eight years and 160,000km worth of cover for the batteries, so if the car you buy is just two or three years old, you’ll have anything up to six years of warranty on the battery-pack. That’s a pretty good deal.
The catch is that the car you buy must have a full service record that shows it has not been neglected in any way. If the service record has gaps in it, Toyota has the right to cancel the warranty on that particular vehicle.
Modern hybrids are clever in that when a battery cell fails, only the dud cell (rather than the whole battery-pack) needs to be replaced. Our experience, too, in this department is that Toyota hybrids are hitting wrecking yards (thanks to crashes) faster than they’re wearing out their battery-packs. That means there’s a decent supply of second-hand batteries with lots of life left in them at reasonable prices. One quote for a second-hand Prius battery-pack was between $1500 and $2000 from a wrecking yard.