ENOfficial
It was narrated that 'Abdur-Rahman bin Samurah said: "The Prophet (ﷺ) said to me: 'If you swear an oath, and 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