Default if i get root on Samsung Galaxy mini 2 to unlock can I...

Helllo,
I live in Austria and i think to buy,so i will not spend to mutch a handy android for my second loca sim card a handy sim lock then i will unlockit installing root and i have seen taht allmost samsung android can be unlock it but,and this is the question,if i unlock a handy and then i upgrade the android version,the unlocked remains or i must unlock it again ?
Very simple question i think but this will be my first android (i have a iphone 4 jailbreaked )
Thank's!
Helen