UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5A0Q6z9JR6KlRJJbNStisX35fFQjt/hbTViy3Y3t13A='
WHERE
key_id = '1496fbd571d7c1b889f42f1a2ea6c520a2892d2de471ae2a732ec321e90bacc7'
AND (
token = '5A0Q6z9JR6KlRJJbNStisX35fFQjt/hbTViy3Y3t13A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)