To be honest, I didn't try it at Hagrid's, but it definitely didn't work for the Gringott's lockers, so I just assumed it wouldn't work. Gringott's had attendants handing out passes to use, but I had my paper ticket with me anywayFWIW, my ticket on my phone worked just fine for popping open the locker.