Sin applies to willingly listening to music for getting pleasure from it. It does not apply to hearing it per se.
If you hear music then if you are able then you should put an end to it as part of enjoining good and forbidding wrong (الأمر بالمعروف والنهي عن المنكر).
ولتكن منكم أمة يدعون إلى الخير ويأمرون بالمعروف وينهون عن المنكر وأولئك هم المفلحون
And let there be [arising] from you a nation inviting to [all that is] good, enjoining what is right and forbidding what is wrong, and those will be the successful.
— Quran 3:104
من رأى منكم منكرا فليغيره بيده فإن لم يستطع فبلسانه
Whoever among you sees an evil action, let him change it with his hand; if he cannot, then with his tongue
— Muslim
If you are not able to do that then you should not go to such a place or should leave it when you realize that there is music. And if you are not able then you should detest the music in your heart and you will not get sin for what you have no control over.
فإن لم يستطع فبقلبه وذلك أضعف الإيمان
... and if he cannot, then with his heart and that is the weakest
of faith.
— Muslim
As for expiation there is no specific expiation for listening to music just like there is no expiation for the majority of other sins. Just repent, ask forgiveness and do good deeds that will erase the sin.