It can be obtained as a reward from the Thief (or bought later from him), or from Betsy, if you let her go without punishment after the first meeting. You can also get lockpicks at the very beginning of the game if you choose the appropriate starting bonus (you need to get the achievement "Masquerade" first).