You should set lockdown mode (enforce PIN/password authentication) before getting mugged. I don't know it's possible on iPhone, but possible on Android.
Press the power button 5 times quickly. Warning: LOUD.
except I was trying to use my phone to record being illegally detained