Switch card generation to look for the next 30 minutes, formatted the query and added limit statement