Sahih Muslim Book 15, Hadith Number 4058.

Chapter : It is excellent to break the vow if one finds it better doing that which is against this vow one should expiate it.

‘Adi reported Allah’s Messenger (may peace be upon him) as saying: When anyone amongst you takes an oath, but he finds (something) better than that he should expiate (the breaking of the oath), and do that which is better.