Abd al-Rahman bin Samurah (may Allah be pleased with him) narrates from the Prophet (peace and blessings be upon him) that the Prophet (peace and blessings be upon him) said: "When you swear an oath about something, and then something else is better than it, give the expiation for your oath and do the better thing."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19959