UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LbRujxD1I2X8QjsEazZmvTlSRnT5x+rGdSDBQtZ2/o0=' 
WHERE 
  key_id = 'e36e63dce3ec42e11efca70aebca6505ac9f440ae332e8a5bc92ad187380e18d' 
  AND (
    token = 'LbRujxD1I2X8QjsEazZmvTlSRnT5x+rGdSDBQtZ2/o0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040