They offer immunity for the crime exposed by the password and thus you are required to disclose.
Does it work that way? Can you legally compel self-incriminating speech as long as you offer immunity?
If that was true, why wouldn't it be used all the time to incriminate other people? Currently they need to get the subject to agree to such a deal, or so the impression I get from the media is.
So make sure that your password is an admission of whatever crime for which your phone contains evidence.