update exam
set end_time = ?
where id = (select id from exam where team_name = ? and topic = ? order by begin_time desc limit 1)

