You can use a counter variable. This can let you keep track of how long your key has been down for.
Then use that counter as a condition for an event.
This is the quick way, but the problem is the random(15,30) will give you a new random number every tick, so basically you will never get to 30. If you want, you can use another variable to store the target time once, and have the condition compare the two variables to run your spawn action instead.