I have checked ServerManagaer class and it gives a lot of functionality to work with IIS, it also contains methods to update values in applicationHost.config file, but I can't fine any way to unlock sections there.
For example for that purpose appcmd.exe unlock config command is used. I need to do the same programmatically.