There is no flock or similar command for Solaris. If I want to do simple locking I use mkdir as it's a atomic operation and avoids potential race conditions with the usual check file exists/touch combination.
if ! mkdir /tmp/lockdir >/dev/null 2>&1
then
    echo >&2 "Lock exists exiting"
    exit 1
fi
 
                