Regarding the expiation for breaking an oath, Dr. Marawan Shahin, Professor of Hadith and its Sciences, said:
“If you made an oath to do or not to do something and later found that it is better to do something else, then you can do what is better but in this case you are required to make expiation for your oath. Also, if you made a promise or an oath using Allah’s name or any of His Attributes and broke your oath out of forgetfulness, and then remembered that you made an oath, then you are still required to expiate for breaking your oath.
The expiation for breaking an oath is to feed ten poor persons or to clothe them of the same standard you do for yourself. If you cannot do that, then you should fast three days. But you do not go for fasting unless you are unable to feed or clothe ten poor persons.
One final word is that one should swear only by Allah and one should not break his or her oath unless a better thing is apparent in which case one can make the better action and expiate for breaking his or her oath as elaborated.