Create code that checks for the user already existing in the cookie table.
If the user id exists in the user column - just update it with the new cookie information. If the user id doesn't exist, create a new record.
Or you can check for existing records, delete them, and then insert the new one.