Not all airports do it the same way. At some, you are standing nearby while they x-ray your luggage. If they see anything they want to see closer, or if you're the unlucky random selected for further search, you can hand them the key and wait for them to satisfy themselves and return it. I saw several people doing this. We, also, bought the brightly colored cable ties. I pinned a zip-lock bag to the lining of the lid with spare cable ties and a note asking that another be put on after inspection. The only suitcase that got inspected, was in an airport where we could see and talk to the inspector. He commented how good an idea this was. He did have some spare, colorless ones to use, though, if we hadn't suppplied our own.
In other airports, you show your ticket as you check your luggage, and that is the last you see of it till you retrieve it at the end of your trip.
I have read that sometimes they will replace the cable and sometimes not. They will break the lock though if you lock it and they want to inspect it, so I'd try the cables if I were you. We also used the colorful straps to go around each suitcase. It helps for identification and keeps your luggage closed if a lock got broken. Mine had a combination lock, so I taped the combination right under the dial. That way it could be opened for inspection without having it cut. The inspector spun the dial for me after he inspected my bag. No, it's not completely safe, but it would slow someone down if they wanted to pinch something and run. Most people just leave their luggage open now.