Sie sind nah dran, ein einfaches UNION ALL
sollte tun, was du willst;
SELECT MAX(del_time), COUNT(*) cnt, MAX(subject) subject FROM (
SELECT to_delete del_time, thread_hash, subject
FROM messages
WHERE to_user_id = 27 AND `to_delete` >= SUBDATE(NOW(), INTERVAL 720 HOUR)
UNION ALL
SELECT from_delete del_time, thread_hash, subject
FROM messages
WHERE from_user_id = 27 AND `from_delete` >= SUBDATE(NOW(), INTERVAL 720 HOUR)
) a
GROUP BY thread_hash;
Die modifizierte SQLfiddle zum Testen .