#假定：修改之前，一定已经查询了该数据
#用户A
UPDATE `user`
SET 
	`password` = MD5('1111111') , 
	`version` = 2
WHERE
	`id` = 10 AND `version` = 1;
#用户B
UPDATE `user`
SET 
	`password` = MD5('2222222'), 
	`version` = 2
WHERE
	`id` = 10 AND `version` = 1;
	
	
	
#逻辑删除
UPDATE `user`
SET 
	`is_delete` = 1
WHERE
	`id` = 10
	AND
	`is_delete` = 0
	AND
	`version` = 2;

SELECT * FROM `user` WHERE `is_delete` = 0;





