The proper way to model this is to key the table so that it doesn't accept duplicates, and then use an ON DUPLICATE KEY UPDATE trigger to override key errors and log a count of executions rather than just a flag of whether it was done or not.
CREATE TABLE user_action (
user_id BIGINT UNSIGNED NOT NULL REFERENCES user(id),
action_id SMALLINT UNSIGNED NOT NULL REFERENCES action(id),
executions INT UNSIGNED NOT NULL,
first_execution TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
PRIMARY KEY (user_id, action_id)
-- Then to record actions:
INSERT INTO user_action (user_id, action_id, executions)
VALUES (1, 1, 1)
ON DUPLICATE KEY UPDATE executions = executions + 1;
Actually, even better than that would be to store a history pipeline of all actions executed and when they were executed and use a VIEW to pull a list of who has done what in a boolean fashion. Always best to collect as much data as possible - cutting stuff out is always easier than adding...