How do we implement SQL Server IF EXISTS (SELECT) in MySQL 5.6?
Assuming Options has a unique key on (OptionCatagory, OptionName), you can use a fake UPSERT/MERGE. More details can be found on MySQL's documentation:
INSERT ... ON DUPLICATE KEY UPDATE syntax.

INSERT INTO Options
(OptionCatagory, OptionName, OptionValue)
VALUES( 'General', 'HVRCustomPortNumber', @custportnum)
ON DUPLICATE KEY UPDATE
OptionValue = @custportnum;


The last part can also be written:

ON DUPLICATE KEY UPDATE
OptionValue = VALUES( OptionValue );