UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '85LIw2x6LoTsZEv1+wULHGx6DtI1LGbdEm9diwt1+Q4='
WHERE
key_id = '9c607afd750be9c93a7a98b2512c1bc30ef6f4d675bfd7f76d68330166d0ae11'
AND (
token = '85LIw2x6LoTsZEv1+wULHGx6DtI1LGbdEm9diwt1+Q4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)