Add function in key_data object to get a writable pointer for the cached key_state/hsm_key.
Add processKeyState() that will process each key state (biggest part of updateZone()).