How to fix when the query to enable SQL Server Broker takes long time

In my company we use SQL Server Broker when trying to enable in the staging server it was taking a long time to enable it. This is very crucial because when you want to enable this on your live server you can't afford to have a down time. The below was taking long time but I got the query wrong.
ALTER DATABASE [<dbname>] SET ENABLE_BROKER
Try the query below:
alter database [<dbname>] set enable_broker with rollback immediate;
Tip: If you want to check which of your Databases are SQL Server Broker enabled:
SELECT name, is_broker_enabled FROM sys.databases