If you unlock something in anyways or means.without the item's owner permission..its illegal.
unless a person is at risk from injury to themselves or others then you may break a lock to put person/persons out of risk,only then.
note:"the owners permission"