How to update and swap values using a query in mySQL