UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '67IT7U1ZTG7JMrFXTGJHn+NqNGG6yg7wWkUE2c63JEA='
WHERE
key_id = '30b23d5f318e70ccdd14b9a056e40f9143c0109619e480b5711ddd7f5f6f461d'
AND (
token = '67IT7U1ZTG7JMrFXTGJHn+NqNGG6yg7wWkUE2c63JEA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)