UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OeU6ndwvx2Io2GBop1UbPxs3VhyotpUQvV8nikjMBoc='
WHERE
key_id = 'e68262bdf3853edb872789c5cba2c551f64e99100ff8bffc40d909c86ac0a26f'
AND (
token = 'OeU6ndwvx2Io2GBop1UbPxs3VhyotpUQvV8nikjMBoc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)