'Adi b. Hatim reported Allah's Messenger (ﷺ) as saying
He who took an oath, but he found something else better than that, should do that which is better and break his oath.