mysql trigger AFTER INSERT if condition syntax error
Based on your own answer, the issue appears to have been with this line:

IF(TIMESTAMPDIFF(HOUR, `triedTime`, CURRENT_TIMESTAMP()) &lt; 60000) THEN


The problem is the `triedTime` reference. According to the manual:


  Within the trigger body, the OLD and NEW keywords enable you to access columns in the rows affected by a trigger.


That is to say, without either NEW or OLD you cannot access columns of the affected rows. So, in the above shown line you probably want to use the NEW keyword:

IF (TIMESTAMPDIFF(HOUR, NEW.`triedTime`, CURRENT_TIMESTAMP()) &lt; 60000) THEN


Your own method of looking the value up in the table works as well, only it means an extra table hit, which may affect performance.