To get all the licenses that are assigned to specific WooCommerce order, use the following code and adjust it to fit your needs.
$licenses = \IdeoLogix\DigitalLicenseManager\Database\Repositories\Licenses::instance()->get(['order_id' => 358]);
foreach($licenses as $license) {
echo $license->getId() . "\n";
echo $license->getDecryptedLicenseKey() . "\n";
echo $license->isExpired() . "\n";
}