It is narrated from Sayyiduna Adi bin Hatim (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever swears an oath and then sees something better than it, let him do what is better."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 14303