ENOfficial
'Abdur-Rahman bin Samurah said: "The Messenger of Allah (ﷺ) said: 'If you swear an oath, then you see something that is better, then do that which is better and offer expiation for your oath.'"
Source: sunnah.com
Other translations
Arabic
أَخْبَرَنَا عَمْرُو بْنُ عَلِيٍّ، قَالَ حَدَّثَنَا يَحْيَى، قَالَ حَدَّثَنَا ابْنُ عَوْنٍ، عَنِ الْحَسَنِ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ سَمُرَةَ، قَالَ قَالَ يَعْنِي رَسُولَ اللَّهِ صلى الله عليه وسلم " إِذَا حَلَفْتَ عَلَى يَمِينٍ فَرَأَيْتَ غَيْرَهَا خَيْرًا مِنْهَا فَأْتِ الَّذِي هُوَ خَيْرٌ مِنْهَا وَكَفِّرْ عَنْ يَمِينِكَ " .
sunnah.com