Complex sentence: When the switch is released, the device will activate, so that if the user is killed while holding the switch, the switch will be released and the bomb will detonate.
Split into simpler sentences: When the switch is released, the device will activate. So if the user is killed while holding the switch, the switch will be released and the bomb will detonate.