No debería funcionar tan bien de esa manera. Cambie su consulta para que sea como
INSERT INTO `archive_course_users`
(`course_id`, `user_id`, `course_qty`)
SELECT @new_course_id, '$user_id', `course_qty`
FROM `current_course_users`
WHERE `course_id` = '$course_id'
AND `user_id` = '$user_id'
AND NOT EXISTS (
SELECT 1
FROM `archive_courses`
WHERE `original_course_id` = '$course_id'
AND `version` = '$current_version');