The issue is `; ||` in
LAST_LOG=$last_log awk 'index($0, ENVIRON["LAST_LOG"]) {y=1;next};y' $log_file ; || cat $log_file
The `;` ends the `awk` invocation and the next command starts with `||`, which is a syntax error.
What you want to do is to check whether `y` is not 1 at the end of parsing the log file, and in that case make `awk` return a non-zero exit status:
LAST_LOG="$last_log" awk '
index($0, ENVIRON["LAST_LOG"]) { y = 1; next }
y { print }
END { exit !y }' <"$log_file" || cat <"$log_file"
Without the explicit `exit` you will only get a non-zero exit status out of `awk` if some sort of error occurred.