The first thing, you want to start with the alert table as it is applicable to all uers. From there, doing a LEFT-JOIN to the already viewed table specifically for the login user ID in question AND the alert IDs are the same.
The where clause is looking ONLY for those entries that it CAN NOT find the corresponding login user ID as having viewed the alert. For those, get the alert's title and data. After that, and presentation to the user, you can insert after the alerts have been viewed.
I would ensure the already viewed table has an index on both keys (T1ID, T2ID) to help optimize the join
SELECT
T1.Title,
T1.Data
from
YourAlertTable T1
LEFT JOIN AlreadyViewedTable T3
ON T3.T2ID = TheUserIDParameterWhoLoggedIn
AND T1.ID = T3.T1ID
where
T3.T2ID IS NULL