I think this should be possible with something like:
SELECT user_id, CURRENT_TIMESTAMP AS granted_at
FROM topic_users
WHERE topic_id = 281534
AND total_msecs_viewed/60000 >= 5 -- min number of minutes viewed
I think this should be possible with something like:
SELECT user_id, CURRENT_TIMESTAMP AS granted_at
FROM topic_users
WHERE topic_id = 281534
AND total_msecs_viewed/60000 >= 5 -- min number of minutes viewed