Nearly a third of British workers have been on the wrong tax code at some point, with the average overpayment worth £689.