updating lock code