Temporarily disable add-on UI property update callback
Only trigger the update when it makes sense, when the value will be changed. Otherwise then don't set the value to the counterpart.

sizex = FloatProperty(name='Size X', description='Size of plane along X',
                      default=10.0, update=update_sizex)

sizey = FloatProperty(name='Size Y', description='Size of plane along Y',
                      default=10.0, update=update_sizey)

def update_sizex(self, context):
    if self.lockSize and self.sizey != self.sizex:
        self.sizey = self.sizex

def update_sizey(self, context):
    if self.lockSize and self.sizex != self.sizey:
        self.sizex = self.sizey


You can also use a temporary property for this. But in my opinion that makes things too complex. Also be aware that the setting can be set incorrectly making the lockSize functionality not working.


from the outside the do_not_update setting can be altered making the whole lockSize button broken.
when an exception happens during updating.


This can be fixed by a using finaly

try:
    self.do_not_update=True
    self.sizex = self.sizey

finally:
    self.do_not_update=False