Sunan an-Nasa'i, Volume 4, Book 35, Hadith 3815 (DarusSalam) ⓘ
It was narrated from 'Abdur-Rahman bin Samurah that the Prophet said: "If you swear an oath, then you see something better than it, then offer expiation for your oath, and do that which is better."
أَخْبَرَنَا مُحَمَّدُ بْنُ يَحْيَى الْقُطَعِيُّ، عَنْ عَبْدِ الأَعْلَى، وَذَكَرَ، كَلِمَةً مَعْنَاهَا حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، عَنِ الْحَسَنِ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ سَمُرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " إِذَا حَلَفْتَ عَلَى يَمِينٍ فَرَأَيْتَ غَيْرَهَا خَيْرًا مِنْهَا فَكَفِّرْ عَنْ يَمِينِكَ وَائْتِ الَّذِي هُوَ خَيْرٌ " .
also referenced under: Hadith 3784 (Reference) & Book 35, Hadith 24 (In-Book)