$seats
variable is undefined inside function, you need to use:
function update_places($id, $seats)
and then call it $update_seats = update_places($id, 123);
also, change your query to be more correct:
$result = $modx->db->update( '`places` = ' . $update_seats, $table, '`id` = ' . intval($id, 10) . ' AND `places` >= ' . $seats );