AIUI the unlocking is usually requested at the customs checkpoint, which is after you've retrieved your checked luggage, and if you say no, you don't get to just "walk away" -- you risk finding yourself detained in legal limbo with no recourse.
I've experienced an unlock demand immediately after passing through TSA to get on a domestic flight. Had I refused I surely would have missed my flight and probably the wedding I was trying to get to. Maybe the consequences would have been even worse than that, but that alone was enough to coerce my compliance.