Improved newkey mechanism to avoid data truncation error when syncing
into MySQL table on server