I start by saying that I haven't actually used kiosk mode, but…
I would probably have a hidden button somewhere that would take you to another layout or dialog that prompts for a password or cancel. This could be a simple if password_field = "SuperSecretPassword" then let you quit, or other admin-related tasks. (Not sure how "secure" storing a password string as plain text in a script step is.) Or you might be able to actually re-login with a different user and password, and that could open up other layouts for admin tasks.
I suppose the easiest solution would be to have a keyboard that can be used with it when needed for getting out of the database. Perhaps a wireless one that could be used as needed. Then have a key combination that would do a script that closes it out.