UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UEXsMcGhtQB1AM4NMmiygDmZEjPHfZmVNLIR1KGvl3I='
WHERE
key_id = '03eeabbcda5d2579ff8751094ac492f510a286eae0b490e82582a063b0d7c040'
AND (
token = 'UEXsMcGhtQB1AM4NMmiygDmZEjPHfZmVNLIR1KGvl3I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)