Simple MySQL query randomly takes forever
To speed up the execution of your query, you need to create a compound index:

ALTER TABLE email_messages
ADD INDEX idx1(is_sent, is_cancelled, time_created);


More information: Multiple-Column Indexes