In my understanding, 速い is used for motion and 早い represents "early".
Which one is the correct one in this example?
Your understanding is correct. 速い refers to one's speed and 早い refers to time. However, 早い has more uses than just meaning early. Check: How to distinguish between the meanings of "quickly", "soon" and "early" for 早く. 早く来る would mean coming quickly with the focus on getting there on time, not particularly on getting there with speed. For example:
Please amend the constitution quickly, which emphasis on getting it done before it is too late. 早く also means to "hurry up," as in the case with coming to class early, or the passage of the amendment, or 「早く質問しろよ」. In your example, 早く would make the most sense.
http://dictionary.goo.ne.jp/jn/179400/meaning/m0u/ Check the dictionary for more detail. 早い has many more definitions than 速い.