You left the data column from your insert example, but you mentioned it several times, so I assume it exists. Also, I assume this is the actual date (not a timestamp or date-time).
If you add a unique index (user, action, date), your request will work.
Here is the DDL:
alter table useractions add unique index unique_idx (user,action,date);
And your DML (adding a date column):
insert into useractions (user, action, times, date) values (2, 3, 1, current_date()) on duplicate key update times = times + 1;
source share