Find cmd not working correctly in script

I am trying to copy 2 types of files so I can archive them. I tested with a set of commands:
touch -t $(date -d "-60 day" +%Y%m%d) WORKDIR/REF
find TARGETDIR/ -type f -maxdepth 1 -iname \*.out\* -or -iname \*.log\* ! -newer WORKDIR/REF -exec ls -l {} \;

This correctly lists any files in the directory over 60 days old with .log or .out in the name. But when I execute this in a ksh script, I only get whichever string I have listed last, in this case I only get the .log files. Switching log and out, I only get the .out files.

I can do this with 2 separate find commands, but I was wondering why it won't work as a single comd in the ksh script?

My guess would be the

 -or -iname

part, as it is looking for one or another, not both.

But the directories that I am searching, have both names in them and the find command finds them both flawlessly when I run it from the command line prompt. It is only in the ksh script that it seems to take only the last search string.