Are you testing this with a Data Extension and do you have a field in it named 'SubscriberKey'? If not, you will need to use '_SubscriberKey' to pull in the system defined SubscriberKey value, [like noted here](https://help.salesforce.com/articleView?id=mc_es_available_personalization_strings.htm&type=5).


Additionally, it doesn't appear that for your use case you should be using `URLEncode()`, and should be using [`Base64Encode()`](https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/Base64Encode.htm).  



Something similar to the following:

    %%[ 
    var @clientkey, @clientkeyencoded, @URLunsubscribe,@enc64
    SET @clientkey = _SubscriberKey
    SET @clientkeyencoded = Base64Encode(@clientkey)
    SET @URLunsubscribe = Concat("http://example.com/unsubscribe/?sk=",@clientkeyencoded)
    ]%%
    
    %%=v(@URLunsubscribe)=%%