Hashem commands Moshe to warn the people not to touch the mountain (Exodus 19:12). Although the Torah doesn't mention it, Moshe's words in v. 23 imply that he indeed warned the people not to touch it. If so, why did Hashem tell him to warn the Jews again (vv. 21-2).
To borrow Avraham Yitzchak's answer here, the Mechilta cited by Rashi (19:24) explains that the second warning was necessary as per the principle of repeated warning, before and during act.