UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OFPEDKfTMh5+/7joDzq5WLiyjfTeXTfyLy8pOCZ3FlY='
WHERE
key_id = '9533c9139fd1580b46e6394321c43815b879eec5416a2e2d221599ded4ef1c1e'
AND (
token = 'OFPEDKfTMh5+/7joDzq5WLiyjfTeXTfyLy8pOCZ3FlY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)