I need to insert information to DB, but if information "user_id" already exist update, like this: (the problem is user_id isn't the KEY)
INSERT INTO access_token 
        (id,access_token,user_id)
VALUES
        (1062371433,106237146,10623714)
ON DUPLICATE user_id     <=== receive error in this line
        UPDATE
            access_token = VALUES(access_token)
but receive error in line 5,
how to fix it?
thanks,
 
     
    