The Knock spell can be used to open locks at least.