Replacing box = with tb.box = shifts the error to the \'.\':
box =
tb.box =
query = (f\'UPDATE tb \' f"SET box = \'{box_update}\' &qu