If you complete Caretaker Moon's quest, you will gain access to the base level of this spell and be able to unlock level one locks. However, if you want to unlock level three locks, you will need to gain access to Alohamora III, which is only granted to witches and wizards who collect all 30 Demiguise statues.