3 Years later after you posted this question I felt that I had to say something. Taking into account that this question pops up when other developers with the same problem as yours struggle to make a decision on such a structured table.
Without saying much, I want to give you a scenario:
Imagine you had a task to check manually if these two values are the same value1 = 1223611547921cvdfr
and value2 = 1223611547921cvdfr
... What would you do? Well the right step would be to compare each character between the two values from start to finish. And then *seconds
later when you're done, you say, well these values are the same.
But what happens if you were to compare these two values value1 = 2
and value2 = 2
? Within a split second you say "they're the same".
Same scenario occurs with computers complicated values lead to longer comparison or load time. Often this time is little to notice but what happens if you run a site like facebook where Billions of Users log in online everytime?
So it's quicker to SELECT user_id WHERE id = "1"
than SELECT user_id WHERE token = "dki3j4rf9u3e40..."
.
Normally though what I'd do is add a security key, more like a Guid or token that must be passed together with the Id on the request before user information is returned from the server. So say for example, you get the user by id and then confirm that the user has the same security key as the one provided. Otherwise, return not-found.
Sometimes it's about simplicity, and simplicity is the preferred way in modern programming. I have seen developers using wrong methods while they keep saying "it's my preference". Often what you prefer leads to bad coding, it's important to remain vigilant and look for Modern Design Patterns as Techs evolve.