UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'USIFHiAirwD1VNz8SCOgvAcThZ8ZObBGkaS/IaxNqdA='
WHERE
key_id = 'e68fc0780f6f307cea72ebacaa2dababedee2abf2bc77a0c39ec4c211c6bdf2c'
AND (
token = 'USIFHiAirwD1VNz8SCOgvAcThZ8ZObBGkaS/IaxNqdA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)