CREATE PROCEDURE dbo.GiftTokenProlong @AGiftTokenNumber VARCHAR(50), @ANumberOfMonths INT AS
SET NOCOUNT ON

DECLARE @tmpGiftTokenId INT

SELECT @tmpGiftTokenId = Id
FROM GiftToken WITH (NOLOCK)
WHERE GiftTokenNumber = @AGiftTokenNumber
AND Status = 1

UPDATE GiftTokenExpire 
SET ExpireDate = DATEADD(MONTH, @ANumberOfMonths, ExpireDate)
WHERE FK_GiftTokenId = @tmpGiftTokenId