Sunan an-Nasa'i, Volume 4, Book 35, Hadith 3813 (DarusSalam)

It was narrated from 'Abdur-Rahman bin Samurah that the Messenger of Allah said: "If any one of you swears an oath, then he sees something better than it, let him offer expiation for his oath, and look at what is better and do it."

أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ الأَعْلَى، قَالَ حَدَّثَنَا الْمُعْتَمِرُ، عَنْ أَبِيهِ، عَنِ الْحَسَنِ، عَنْ عَبْدِ الرَّحْمَنِ بْنِ سَمُرَةَ، عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا حَلَفَ أَحَدُكُمْ عَلَى يَمِينٍ فَرَأَى غَيْرَهَا خَيْرًا مِنْهَا فَلْيُكَفِّرْ عَنْ يَمِينِهِ وَلْيَنْظُرِ الَّذِي هُوَ خَيْرٌ فَلْيَأْتِهِ ‏" ‏ ‏.‏

sunnah.com