Convert Subquery to Self Join
I don’t think a JOIN is really what you need here. I would use the following query, which avoids UNION :
SELECT m.* FROM ma mWHERE m.action_id = 3 OR NOT EXISTS ( SELECT 1 FROM ma m1 WHERE m1.scheduled_id = m.scheduled_id AND m1.action_id = 3 )
When it comes to checking for the existence (or absence) of something, NOT EXISTS with a correlated subquery is usually the most relevant and efficient approach.