UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UGs6Sf+++WiCVhF0a7ZlGCcaMYOvXsXqBWBR8/ntPQs='
WHERE
key_id = '700897c6c4c639047e76a5550df8da55b16904e5d82319335e6c70a30bcce525'
AND (
token = 'UGs6Sf+++WiCVhF0a7ZlGCcaMYOvXsXqBWBR8/ntPQs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)