UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rcdaZHHNqSMA+slvzto/iN5fHrPTUt9rQap+aGFfCtU='
WHERE
key_id = 'b84063d31cc077f1a6bf85e4c4476cb586e5663f00e02d071607b10abcd81c9f'
AND (
token = 'rcdaZHHNqSMA+slvzto/iN5fHrPTUt9rQap+aGFfCtU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)