Abu Hurayrah (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Whoever swears an oath about something, then (sees that) something else is better than it, let him do that and give the expiation for his oath."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19949