UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V2kHo/oZZkrAVy25O8l7pFaJvXjz6Ib4H2qq9h87ckY='
WHERE
key_id = '72651946ff132278121c3c515508750e11affd56ea82fd1f14fd7ccec0eaed0d'
AND (
token = 'V2kHo/oZZkrAVy25O8l7pFaJvXjz6Ib4H2qq9h87ckY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)