あなたはサブクエリでそれを行うことができます:
select t.userID, max(t.time)
from
(
select userID, time
from tableName
where time <= nnn
) t
group by t.userID
または単に:
select userID, max(time)
from tableName
where time <= nnn
group by userID