Excuse me if I'm misunderstanding anything, but instead of watching to see if the power button is pressed and then calling the SystemUI D-Bus method that unlocks the device..
self.bus.add_signal_receiver(self.unlock, path='/com/nokia/mce/signal', dbus_interface='com.nokia.mce.signal', signal_name='tklock_mode_ind')
...why not just disable locking when a selected network is connected to and then re-enable it when the device disconnects? You can turn off the autolock by changing the value of GConf key /system/osso/dsm/locks/devicelock_autolock_enabled
gconftool -s -t bool /system/osso/dsm/locks/devicelock_autolock_enabled false
dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_open string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'3'
dbus-send --system --type=method_call --dest=com.nokia.system_ui /com/nokia/system_ui/request com.nokia.system_ui.request.devlock_close string:"com.nokia.mce" string:"/com/nokia/mce/request" string:"com.nokia.mce.request" string:"devlock_callback" uint32:'0'