Crontab + PHP. Send over 50 thousand notifications

My script is sending push notifications to devices, something like

    //Tokens count could be large
    foreach ($tokens as $value) {
            PushNotifications::iOS($msg_payload, $value);
    }

It works via stream_context_set, here is the function

    // Sends Push notification for iOS users
    public function iOS($data, $devicetoken) {

            $deviceToken = $devicetoken;

            $ctx = stream_context_create();
            // ck.pem is your certificate file
            stream_context_set_option($ctx, 'ssl', 'local_cert', '/var/cron/ck.pem');
            stream_context_set_option($ctx, 'ssl', 'passphrase', self::$passphrase);

            // Open a connection to the APNS server
            $fp = stream_socket_client(
                    'ssl://gateway.push.apple.com:2195', $err,
                    $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);

            if (!$fp)
                    exit("Failed to connect: $err $errstr" . PHP_EOL);

            // Create the payload body
            $body['aps'] = array(
                'alert' => array(
                    'title-loc-key' => $data['mtitle'],
                    'body' => $data['mdesc'],
                 ),
                'sound' => 'default'
            );

            // Encode the payload as JSON
            $payload = json_encode($body);

            // Build the binary notification
            $msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload;

            // Send it to the server
            $result = fwrite($fp, $msg, strlen($msg));
            
            // Close the connection to the server
            fclose($fp);

            if (!$result)
                    return 'Message not delivered' . PHP_EOL;
            else
                    return 'Message successfully delivered' . PHP_EOL;

    }

My questions is: since PHP has a limit for maximum script execution time (30s by default as i know) and my script probably could be running more than 30s. Should i set max_execution_time to zero (infinite) in php.ini? Or this setting doesn't affect scripts which running via cron?