fast and dirty do a
Even better, of course, is to use millis() to record when you turned the relay on, and ignore any requests to turn the relay on again unless the time between the new request and the old (successful) request is greater than the threshold. Look at the blink without delay example.
For why, suppose that the time was 1 hour, instead of 1 second, and the Arduino was displaying the time, too.
Using millis(), the Arduino would continue to display the time. Using delay() it would not.