Thanks RynO-SauruS, that works for me.
Edit: My small modifications to the mySQL queries in sv_utime.lua adding firstvisit and IP logging.
line 60
result = xquery( "CREATE TABLE utime (id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,player INTEGER UNSIGNED NOT NULL,ip VARCHAR(30) NOT NULL,totaltime INTEGER UNSIGNED NOT NULL,lastvisit INTEGER UNSIGNED NOT NULL,firstvisit INTEGER UNSIGNED NOT NULL,steamid VARCHAR(45) NOT NULL,playername VARCHAR(100) NOT NULL,team VARCHAR(45),PRIMARY KEY (id))" );
line 86
xquery( "UPDATE utime SET ip = '" .. ply:IPAddress() .. "', lastvisit = " .. os.time() .. " WHERE player = " .. uid .. ";" )
line 101
local result, succ, err = mysql.query(db, "INSERT into utime ( ip, player, totaltime, lastvisit, steamid, playername, team, firstvisit ) VALUES ( '" .. ply:IPAddress() .. "', " .. uid .. ", 0, " .. os.time() .. ", '" .. sid .. "', '" .. mysql.escape(db, nam) .. "', '" .. mysql.escape(db, tem) .. "', " .. os.time() .. ");")
I hope this would be useful for someone.