I would approach this differently. I would create a gateway script which would run every few seconds (depending on how fast data was being added to the database) and parse the last record. If this value had changed it would write the new value to a SQLTag for display and would also write it out to a database. I would also think about reading the time information from the record - it seems a shame to throw this data away and would help identify if 2 subsequent records actually had identical values.
You will have to make sure you can reliably parse the text string - what you’re doing (searching for '(OK) ’ and then stepping forward 68 characters) doesn’t look right, particularly when the string can change in length.