update user_vip set is_vip=1 where is_vip=2 and date_format(end_time,'%Y-%m-%d %H:%i:%S')<=date_format(now(),'%Y-%m-%d %H:%i:%S')