‘Adi ibn Hatim reported: The Messenger of Allah, peace and blessings be upon him, said, “Whoever has given an oath by his right hand, then he sees something more righteous to Allah than it, let him choose righteousness.”
Source: Ṣaḥīḥ Muslim 1651
Grade: Sahih (authentic) according to Muslim
عَنْ عَدِيِّ بْنِ حَاتِمٍ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَنْ حَلَفَ عَلَى يَمِينٍ ثُمَّ رَأَى أَتْقَى لِلهِ مِنْهَا فَلْيَأْتِ التَّقْوَى
1651 صحيح مسلم كتاب الأيمان باب ندب من حلف يمينا فرأى غيرها خيرا منها أن يأتي الذي هو خير ويكفر عن يمينه