Wasalam
May Allah bless you.
First, try to work out how much of the premium you have paid, and how much you have claimed. If you have claimed more than you have paid, then donate this amount to charity.
For the car insurance, you will do the same. The premium paid is your money, which is halal. So in the case of a claim, you can take the amount contributed. The extra amount, should be given to charity. Even if, out of necessity you have to use the entire payout amount, you must have the intention to donate the extra amount, as soon as you can afford to.
If you have sold the extended warranty at the time of selling the product, then its fine, you do not need to purify your wealth. Some scholars consider extended warranty permissible, when it is purchased at the same time of purchasing the product (Extended warranties).
Thus, selling the warranty at the same time of selling the product, I would see it as permissible.
And Allah knows best!