Adding brackets to indicate operator precedence, we get: [...] WHERE (name='admin' AND password='123') OR sleep(5)
So, while it is true that a correct guess for the admin password skips the sleep(5) function for that entry, the overall query also executes sleep(5) for every other user. Because the query always runs some amount of sleep(5), it does not reveal the information about the attacker password by itself.