The legal precedents that have been set in this area basically boil down to this: if the police could unlock your phone while you were unconscious (e.g. by placing your finger on it or pointing it at your face) then they are allowed to do so.
You cannot be legally compelled to reveal your password or unlock a device with your password. Obviously you could be forced anyway, but evidence collected this way would be inadmissable in court.