Simply put: no. Time is always changing. They only way that could work is that you CONSTANTLY update the last_active column (almost every second or half a second) and even then it will be really inaccurate.
You can acheive this with Sessions I think.
The Following User Says Thank You to masfenix For This Useful Post: