The police often ask for pins and passwords when seizing a smartphone on a court order or when seizing a smartphone. Do not say anything. Do not unlock anything. Contact a lawyer.
More information
You should also not react if you receive a letter from the police asking you to hand over your PIN. The police may also try to put you under verbal pressure. They may tell you that handing over the password will mitigate the penalty. Or they might tell you that you will get your phone back more quickly. Or they claim that it can be expensive for you to have your smartphone cracked professionally. Stand firm and refuse to hand it over! If in doubt, contact a lawyer.