Why?
Why store something that you have already, in the sense that you can calculate it whenever you need to? Storing it as separate information just increases your database size and provides a route for error to creep in - as it does - when somehow the difference between the In and Out times, and the stores value do not match.
SELECT DATEDIFF(second, logintime, logouttime) as loggedInSeconds FROM logininfo
If you really must store it, then you can use the same command:
UPDATE logininfo SET totaltime=DATEDIFF(second, logintime, logouttime)
But I wouldn't do it myself.