sqlite update based on select