Get previous field's value in MySQL trigger
You are treating Handler like an AUTO_INCREMENT.  Why not get rid of ID?  Or use it instead of having an extra column?

Edit

Since you want to "reset to 0" the number at the start of the year...  Assuming this is what you want, then converting it to a TRIGGER should work:

START TRANSACTION;  -- To keep other connections from overlapping
SELECT @year := ...,
       @next := MAX(Handler)+1
    FROM ...;
IF (YEAR(now() &gt; @year) THEN
    SET @next := 0;
ENDIF
INSERT ... @next ...;