python mysql update if exists else insert