Changing the setting back and forth is rather pointless - that won't change any read markers in the DB.
Wile it would display content < 1 day as read, it would display content as unread after changing the setting back to whatever it was before unless the user triggered a read marker update in DB
While it is possible to mark all forums read for all users, you
really would not want to do this on any decent sized forum as it would generate a cartesian product.
Code:
TRUNCATE xf_thread_read;
TRUNCATE xf_forum_read;
INSERT INTO xf_forum_read
(user_id, node_id, forum_read_date)
VALUES
(
SELECT xf_user.user_id, xf_forum.node_id, UNIX_TMESTAMP(NOW())
FROM xf_user, xf_forum
);