Update Longest ks in the SQL db